import os


file="/mnt/hwfile/opendatalab/ouyanglinke/PDF_Formula/faiss/train_img_list.txt"


with open(file,'r') as f:
    for line in f:
        target_name=line.strip()
        if os.path.exists(target_name):
            # print(target_name,'-------------------->已存在')
            continue
        else:
            print(target_name,'-------------------------------------------------------------------------------->不存在')

            # dirname=os.path.dirname(target_name)
            # base_name=os.path.basename(target_name)
            # src_path=f'/root/project/doc-pipeline/faiss-image/{base_name}'
    
            # os.makedirs(dirname,exist_ok=True)
            # cmd=f'cp "{src_path}"  "{target_name}"'
            # # print(cmd)
            # while 1:
            #     status=os.system(cmd)
            #     if status==0:
            #         break


        
